package liuyang.bigeventserver.modules.security.jwt.impl;

import cn.hutool.jwt.JWT;
import liuyang.bigeventserver.modules.security.jwt.JwtTokenService;
import liuyang.bigeventserver.modules.security.jwt.JwtTokenServiceProperties;
import liuyang.bigeventserver.modules.security.jwt.vo.PrincipalInfo;

import java.util.Date;

/**
 * @author xconf
 * @since 2024/2/28
 */
public class HutoolTokenService implements JwtTokenService {

    private final JwtTokenServiceProperties jwtTokenServiceProperties;

    public HutoolTokenService(JwtTokenServiceProperties jwtTokenServiceProperties) {
        this.jwtTokenServiceProperties = jwtTokenServiceProperties;
    }

    @Override
    public String getSecretKey() {
        return jwtTokenServiceProperties.getSecretKey();
    }

    @Override
    public String getIssuer() {
        return jwtTokenServiceProperties.getIssuer();
    }

    @Override
    public Long getTtl() {
        return jwtTokenServiceProperties.getTtl();
    }

    @Override
    public String sign(String username) {
        // TODO
        return null;
    }

    @Override
    public String sign(String userid, String username) {
        return null;
    }

    @Override
    public PrincipalInfo verify(String token) {
        // TODO
        return null;
    }
}
